package com.open.capacity.statistics.controller;

import com.open.capacity.common.web.PageResult;
import com.open.capacity.statistics.model.ActivityCountsModel;
import com.open.capacity.statistics.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/statistics")
public class StatisticsController {

    @Autowired
    private StatisticsService statisticsService;
    /**
     * 查询出活动所有公司，简历，招聘信息数量
     * @param map
     * @return
     */
    @RequestMapping("/fullSearch")
    public PageResult<ActivityCountsModel>fullSearch(@RequestParam Map<String,Object>map){
    List<ActivityCountsModel>list=statisticsService.fullSearch(map);
        return PageResult.<ActivityCountsModel>builder().code(0).data(list).count((long) list.size()).build();
   }



}
